package com.example.choupaiapp.main.bean;

import com.sunfusheng.marqueeview.IMarqueeItem;

import java.io.Serializable;
import java.util.List;

/**
 * Created by ASUS on 2019/11/27.
 */

public class SearchHotBean implements Serializable {

    /**
     * msg : success
     * code : 0
     * page : {"totalCount":2,"pageSize":10,"totalPage":1,"currPage":1,"list":[{"id":1,"name":"123","status":1,"weight":0,"createTime":null},{"id":2,"name":"345","status":1,"weight":0,"createTime":null}]}
     */

    private String msg;
    private int code;
    private PageBean page;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public PageBean getPage() {
        return page;
    }

    public void setPage(PageBean page) {
        this.page = page;
    }

    public static class PageBean implements Serializable{
        /**
         * totalCount : 2
         * pageSize : 10
         * totalPage : 1
         * currPage : 1
         * list : [{"id":1,"name":"123","status":1,"weight":0,"createTime":null},{"id":2,"name":"345","status":1,"weight":0,"createTime":null}]
         */

        private int totalCount;
        private int pageSize;
        private int totalPage;
        private int currPage;
        private List<ListBean> list;

        public int getTotalCount() {
            return totalCount;
        }

        public void setTotalCount(int totalCount) {
            this.totalCount = totalCount;
        }

        public int getPageSize() {
            return pageSize;
        }

        public void setPageSize(int pageSize) {
            this.pageSize = pageSize;
        }

        public int getTotalPage() {
            return totalPage;
        }

        public void setTotalPage(int totalPage) {
            this.totalPage = totalPage;
        }

        public int getCurrPage() {
            return currPage;
        }

        public void setCurrPage(int currPage) {
            this.currPage = currPage;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        public static class ListBean implements IMarqueeItem,Serializable{
            /**
             * id : 1
             * name : 123
             * status : 1
             * weight : 0
             * createTime : null
             */

            private int id;
            private String name;
            private int status;
            private int weight;
            private Object createTime;
            private int label;

            public int getLabel() {
                return label;
            }

            public void setLabel(int label) {
                this.label = label;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public int getWeight() {
                return weight;
            }

            public void setWeight(int weight) {
                this.weight = weight;
            }

            public Object getCreateTime() {
                return createTime;
            }

            public void setCreateTime(Object createTime) {
                this.createTime = createTime;
            }

            @Override
            public CharSequence marqueeMessage() {
                if(name.length()>10){
                    return name.substring(0,9)+"...";
                }else{
                    return name;
                }
            }
        }
    }
}
